/* eslint-disable indent */
'use strict'

/**
 * APP应用表
 */

module.exports = app => {
    const { TEXT, STRING, INTEGER, DATE } = app.Sequelize

    const Appauth = app.model.define('appauth', {
        id: {
            type: INTEGER,
            primaryKey: true,
            autoIncrement: true
        },
        appid: {
            type: STRING,
            allowNull: false,
            comment: 'APPID'
        },
        secret: {
            type: STRING,
            allowNull: false,
            comment: '密钥'
        },
        app_name: {
            type: STRING,
            allowNull: false,
            comment: '应用名称'
        },
        status: {
            type: INTEGER,
            comment: '状态',
            defaultValue: 1
        }
    })

    return Appauth
}
